package xyz.zhzby.cyzx.oj.service;

import xyz.zhzby.cyzx.oj.dto.request.ProblemAddRequest;
import xyz.zhzby.cyzx.oj.dto.request.ProblemJudgeRequest;
import xyz.zhzby.cyzx.oj.dto.request.ProblemPageRequest;
import xyz.zhzby.cyzx.oj.dto.response.ProblemResponse;
import xyz.zhzby.cyzx.oj.entity.Problem;
import com.baomidou.mybatisplus.extension.service.IService;
import xyz.zhzby.cyzx.servicebase.domain.PageResponse;
import xyz.zhzby.cyzx.servicebase.domain.RestResponse;

/**
 * <p>
 * 试题表 服务类
 * </p>
 *
 * @author zby
 * @since 2021-12-26
 */
public interface IProblemService extends IService<Problem> {

    RestResponse<Long> createProblem(ProblemAddRequest problemAddRequest);

    RestResponse<Long> updateProblem(ProblemAddRequest problemAddRequest);

    RestResponse<ProblemResponse> getProblemById(Long problemID);

    RestResponse<PageResponse<ProblemResponse>> getProblemList(ProblemPageRequest problemPageRequest);

    RestResponse<String> deleteProblem(Long problemID);

    RestResponse<String> recycle(Long problemID);

    RestResponse<Long> getRandomProblem();

    RestResponse<String> testCode(ProblemJudgeRequest problemJudgeRequest);

    RestResponse<String> judgeCode(ProblemJudgeRequest problemJudgeRequest);
}
